<?php
    include("../inc/dbconn.php");

    $sql = "select * from division order by Id asc";

    $result = $conn->query($sql);

    if ($result->num_rows > 0){
        while($row = mysqli_fetch_assoc($result)){
            $rows[] = $row;
        }
        $data["code"] = 3000;
        $data["list"] = $rows;
    }
    echo json_encode($data);
?>